package com.hying.controller;

import com.hying.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuhongfeng
 * @date 2019/2/16 20:32
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    RedisUtil redisUtil;

    @GetMapping("/redis")
    public void redis(String param) {
        redisUtil.set("param", param);
        System.out.println(redisUtil.get("param"));
    }

}
